package org.dralee.springsecurity.models;

/**
 * @author jackielee
 * @version 1.0
 * @description vo
 * @date 2021/3/29
 **/
public class ApiResult {
    private String message;
    private int code;

    public String getMessage() {
        return message;
    }

    public int getCode() {
        return code;
    }

    private ApiResult() {
    }

    private ApiResult(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ApiResult failure(int code, String message){
        return new ApiResult(code, message);
    }

    public static ApiResult success( String message){
        return failure(0, message);
    }

}
